import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import {getCategoryAPI} from "@/apis/Layout.js"

export const useCategoryStore = defineStore('category', () => {
  // 导航列表的数据
  const CategoryList = ref([])

  const getCategory = async () => {
    const res = await getCategoryAPI()
    CategoryList.value = res.result
  }
  
  return { getCategory,CategoryList  }
})
